package com.easylinkin.linkappapi.investigation.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 排查任务详情
 * </p>
 *
 * @author TongJie
 * @since 2021-04-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("investigation_task_detail")
public class InvestigationTaskDetail extends Model<InvestigationTaskDetail> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 排查任务id
     */
    @TableField("investigation_task_id")
    private Long investigationTaskId;

    /**
     * 类型名称
     */
    @TableField("investigation_type_name")
    private String investigationTypeName;

    /**
     * 序号
     */
    @TableField("sort_no")
    private Integer sortNo;

    /**
     * 处理人
     */
    @TableField("user_id")
    private String userId;

    /**
     * 处理人名称
     */
    @TableField("user_name")
    private String userName;

    /**
     * 区域id
     */
    @TableField("area_id")
    private String areaId;

    /**
     * 区域位置
     */
    @TableField("area_path")
    private String areaPath;

    /**
     * 检视状态,0-异常，1-正常
     */
    @TableField("view_status")
    private Integer viewStatus;

    /**
     * 处理状态,0-未处理，1-已处理
     */
    @TableField("deal_status")
    private Integer dealStatus;

    /**
     * 说明
     */
    @TableField("description")
    private String description;

    /**
     * 位置描述
     */
    @TableField(exist = false)
    private String siteDescription;

    /**
     * 处理时间
     */
    @TableField("deal_time")
    private Date dealTime;

    /**
     * 设施图片
     */
    @TableField("facilities_picture")
    private String facilitiesPicture;

    /**
     * 人脸图片
     */
    @TableField("face_picture")
    private String facePicture;

    /**
     * 人脸识别匹配状态 0-未识别匹配正确 1-已识别匹配正确
     */
    @TableField("face_recognition_status")
    private Integer faceRecognitionStatus;

    /**
     * 租户id
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("modify_time")
    private Date modifyTime;

    /**
     * 创建人id
     */
    @TableField("creator")
    private String creator;

    /**
     * 修改人id
     */
    @TableField("modifier")
    private String modifier;


    public InvestigationTaskDetail() {
    }

    public InvestigationTaskDetail(String userId, String tenantId, String investigationTypeName, int sortNo, String areaId, Integer dealStatus) {
        this.tenantId = tenantId;
        this.userId = userId;
        this.sortNo = sortNo;
        this.investigationTypeName = investigationTypeName;
        this.areaId = areaId;
        this.dealStatus = dealStatus;
    }


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
